home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / earthlink / nscomm / java40.jar / netscape / debug / DebugController.class (.txt) next >
Encoding:
Java Class File  |  1997-11-03  |  1.7 KB  |  60 lines

  1. package netscape.debug;
  2.  
  3. import java.lang.reflect.Field;
  4. import java.util.Hashtable;
  5.  
  6. public class DebugController {
  7.    private static DebugController controller;
  8.    private VMHook vmHook;
  9.    private Hashtable instructionHookTable;
  10.  
  11.    public static synchronized DebugController getDebugController() {
  12.       if (controller == null) {
  13.          controller = new DebugController();
  14.       }
  15.  
  16.       return controller;
  17.    }
  18.  
  19.    public native void sendInterrupt(Thread var1);
  20.  
  21.    public synchronized VMHook setVMHook(VMHook var1) {
  22.       VMHook var2 = this.vmHook;
  23.       this.vmHook = var1;
  24.       return var2;
  25.    }
  26.  
  27.    public VMHook getVMHook() {
  28.       return this.vmHook;
  29.    }
  30.  
  31.    public synchronized InstructionHook setInstructionHook(PC var1, InstructionHook var2) {
  32.       if (this.instructionHookTable == null) {
  33.          this.instructionHookTable = new Hashtable();
  34.       }
  35.  
  36.       InstructionHook var3 = (InstructionHook)this.instructionHookTable.get(var1);
  37.       this.instructionHookTable.put(var1, var2);
  38.       this.setInstructionHook0(var1);
  39.       return var3;
  40.    }
  41.  
  42.    private native void setInstructionHook0(PC var1);
  43.  
  44.    public InstructionHook getInstructionHook(PC var1) {
  45.       return this.instructionHookTable == null ? null : (InstructionHook)this.instructionHookTable.get(var1);
  46.    }
  47.  
  48.    public synchronized native ThreadHook setThreadHook(Thread var1, ThreadHook var2);
  49.  
  50.    public native ThreadHook getThreadHook(Thread var1);
  51.  
  52.    public synchronized FieldHook setFieldHook(Field var1, FieldHook var2) {
  53.       return null;
  54.    }
  55.  
  56.    public FieldHook getFieldHook(Field var1) {
  57.       return null;
  58.    }
  59. }
  60.